import { getPage } from '@/api/page'

const state = {
  pageList: []
}

const mutations = {
  updated(state, payload) {
    for (const key in payload) {
      state[key] = payload[key]
    }
  }
}

const actions = {
  async getpageList({ commit }, payload = {}) {
    const { page = 1, pageSize = 4, ...options } = payload
    const result = await getPage(page, pageSize, options)
    console.log(result)
  }

}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
